package com.itaq.cheetah.serviceA.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.itaq.cheetah.serviceA.config.enums.EncryptType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * 单点登录接口对象 sso_client_detail
 *
 * @author cheetah
 * @date 2022-07-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sso_client_detail")
@ApiModel(value = "SsoClientDetail对象", description = "单点登录接口表")
public class SsoClientDetail implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 应用名称
     */
    @ApiModelProperty(value = "应用名称")
    @TableField("platform_name")
    private String platformName;

    /**
     * 应用标识
     */
    @NotEmpty
    @ApiModelProperty(value = "应用标识")
    @TableField("platform_id")
    private String platformId;

    /**
     * 应用秘钥
     */
    @NotEmpty
    @ApiModelProperty(value = "应用秘钥")
    @TableField("platform_secret")
    private String platformSecret;

    /**
     * 加密方式
     *
     * @see EncryptType
     */
    @NotEmpty
    @ApiModelProperty("加密方式")
    @TableField("encrypt_type")
    private String encryptType;

    /**
     * 应用公钥
     */
    @ApiModelProperty(value = "应用公钥")
    @TableField("public_key")
    private String publicKey;

    /**
     * 单点登录地址
     */
    @ApiModelProperty(value = "单点登录地址")
    @TableField("sso_url")
    private String ssoUrl;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @NotNull
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_date", fill = FieldFill.INSERT)
    private LocalDateTime createDate;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_date", fill = FieldFill.UPDATE)
    private LocalDateTime updateDate;

    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    @TableField(value = "update_by", fill = FieldFill.UPDATE)
    private String updateBy;

    /**
     * 删除标志，0：正常；1：已删除
     */
    @NotNull
    @ApiModelProperty(value = "删除标志，0：正常；1：已删除")
    @TableField("del_flag")
    private Integer delFlag;

}